package lancs.mobilemedia.core.ui.controller;

import java.util.Hashtable;

abstract class ControllerMapperDecorator implements ControllerMapper {

	ControllerMapper mapper;

	protected Hashtable commands;

	public ControllerMapperDecorator(ControllerMapper mapper) {
		this.mapper = mapper;
		commands = new Hashtable();
		init();
	}

	public ControllerCommand getCommand(String label) {
		return (ControllerCommand) (commands.containsKey(label) ? commands.get(label) : mapper.getCommand(label));
	}
}
